﻿using UnityEngine;
using System.Collections;

public class King : MonoBehaviour {

	public Sprite Dead;
	public Transform b1;
	public Transform b2;

	void Die () 
	{
		GetComponent<SpriteRenderer>().sprite = Dead;
		StartCoroutine(final());
	}

	IEnumerator final()
	{
		yield return new WaitForSeconds(1);
		b1.gameObject.AddComponent("Close");
		b2.gameObject.AddComponent("Close");
		yield return new WaitForSeconds(2);
		Application.LoadLevel("FinalHistory");
	}
}
